<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />

    <link rel="stylesheet" type="text/css" href="../../css/colleague.css" />

    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/jquery.js"></script>

    <script type="text/javascript" src="../../script/main.js"></script>
</head>
<body>
  <div id="header">
      <div id="back"></div>
      <h3>职业标准管理</h3>
  </div>
  <div id="all" style="height:500px;">
    <!-- <div class="kind">
      <div class="kind_span"><span>意见所属类别</span></div>
      <div class="kind_selete">
        <div class="btn-toolbar" role="toolbar">
          <div class="btn-group">
              <button type="button" class="btn btn-default kind_selete_1">bug</button>
           </div>
          <div class="btn-group">
              <button type="button" class="btn btn-default kind_selete_2">产品建议</button>
          </div>
          <div class="btn-group">
              <button type="button" class="btn btn-default kind_selete_3">吐槽</button>
          </div>
          <div class="btn-group">
              <button type="button" class="btn btn-default kind_selete_4">其他</button>
          </div>
        </div>
      </div>
    </div> -->
    <div class="kind">
      <div class="kind_span"><span>职业名称：</span></div>
      <div class="kind_span"><span>职业序号：</span></div>
    </div>
    <div class="feedback_span"><span>职业标准</span></div>
          <!-- <textarea name="feedback_content_span_text" placeholder="反馈bug时，请描述具体操作步骤及问题" style="height:200px;"></textarea> -->

    <div class="btn_hide"></div>
    <!-- <div class="contact_way">
      <div class="contact_way_span"><span>你的联系方式</span></div>
      <textarea name="contact_way_span_text" class="contact_way_span_text" placeholder="留下邮箱或电话，方便我们联系你哦"></textarea>
    </div> -->
  </div>

</body>
<script>
  apiready=function(){
    //接收manage.html传过来的参数
    var id=api.pageParam.id;
    var url="/api/professions/"+id;
    var imageSrc;
    var functionRet=function(ret){
      if(ret){
          $(".kind").find("div:eq(0)").append('<span>'+ret.name+'</span>');
          $(".kind").find("div:eq(1)").append('<span>'+ret.code+'</span>');
          imageSrc="http://"+ret.infoImageUrl.replace(/["'"]/g,"");
            //imageSrc[i].replace(/["'"]/g代表将全局的"''"全部替换成空字符串，即去掉获取到的字符串两边的引号
            var imgs='<img src='+imageSrc+'>';
            $(".btn_hide").append(imgs);
        }
    }
    var functionErr=function(err){

      }
    get(url,functionRet,functionErr);
    //------------------------------------------------------------

    $(".btn_hide").on("click",function(){
           var photoBrowser = api.require('photoBrowser');
           photoBrowser.open({
           images:[
             imageSrc
           ],
           bgColor: '#000',
           activeIndex:0,
         //  placeholderImg:'fs://image/data.png'
           }, function(ret, err) {
             if(ret.eventType=="click")
             {
               var photoBrowser = api.require('photoBrowser');
               photoBrowser.close();
             }
           });
    })
  }
</script>
<script>

  $(function(){
    back();
  })
</script>
</html>
